Skip to content

Parallelize ChannelMonitor loading from async KVStores#4147

Merged
TheBlueMatt merged 5 commits into
lightningdevkit:mainfrom
TheBlueMatt:2025-10-parallel-reads
Jan 8, 2026
Merged

Parallelize ChannelMonitor loading from async KVStores#4147
TheBlueMatt merged 5 commits into
lightningdevkit:mainfrom
TheBlueMatt:2025-10-parallel-reads

Conversation

@TheBlueMatt
Copy link
Copy Markdown
Collaborator

@TheBlueMatt TheBlueMatt commented Oct 7, 2025

Reading `ChannelMonitor`s on startup is one of the slowest parts of
LDK initialization. Now that we have an async `KVStore`, there's no
need for that, we can simply paralellize their loading, which we do
here.

Sadly, because Rust futures are pretty unergonomic, we have to add
some `unsafe {}` here, but arguing its fine is relatively
straightforward.

Based on #4146 #4175 just cause I don't want to resolve conflicts.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants